package ${baseInfo.packageName};

import ${baseMapper.packageName}.${baseMapper.fileName};
import ${baseService.packageName}.${baseService.fileName};

import java.util.Collection;

/**
 * 数据库操作BaseService实现
 *
 * @author MyBatisX Generator
 */
public abstract class ${baseServiceImpl.fileName}${'<T>'} implements ${baseService.fileName}${'<T>'} {

    /**
     * 获取mapper对象
     *
     * @see ${baseMapper.fileName}
     */
    protected abstract BaseMapper${'<T>'} getMapper();

    @Override
    public int save(T record){
       return this.getMapper().save(record);
    }

    @Override
    public int saveSelective(T record){
        return this.getMapper().saveSelective(record);
    }

    @Override
    public int saveOnDuplicateKey(T record){
       return this.getMapper().saveOnDuplicateKey(record);
    }

    @Override
    public int update(T record){
        return this.getMapper().update(record);
    }

    @Override
    public int updateSelectiveByPk(T query){
        return this.getMapper().updateSelectiveByPk(query);
    }

    @Override
    public int removeByPk(Long pk){
        return this.getMapper().removeByPk(pk);
    }

    @Override
    public int removeByPkList(${'Collection<Long>'} pkList){
        return this.getMapper().removeByPkList(pkList);
    }

    @Override
    public int deleteByPk(Long pk){
        return this.getMapper().deleteByPk(pk);
    }

    @Override
    public int deleteByPkList(${'Collection<Long>'} pkList){
        return this.getMapper().deleteByPkList(pkList);
    }

    @Override
    public T get(Long pk){
        return this.getMapper().get(pk);
    }

    @Override
    public ${'Collection<T>'} list(T query){
        return this.getMapper().list(query);
    }
}




